home *** CD-ROM | disk | FTP | other *** search
/ MacHack 1994 / MacHack 1994.toast / MacHack™94 / Talks & Papers / Timothy Knox / Help / Docs / Doc-English.Ascii < prev    next >
Text File  |  1994-06-24  |  79KB  |  1,974 lines

  1.  
  2.  
  3. Conclusion
  4.  
  5. Bibliographie
  6.  
  7. Bibliographie
  8.  
  9. Exemples
  10.  
  11. Index
  12.  
  13. Exemples
  14.  
  15. Index
  16.  
  17. Index
  18.  
  19. Index
  20.  
  21.  
  22.  
  23.  
  24.  
  25.  
  26. Help
  27.  
  28.  
  29. Version 1.0 (January 91)
  30.  
  31.  
  32.  
  33.  
  34.  
  35.  
  36.  
  37.  
  38. A Scheme-like Lazy Lisp dialect 
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50. This is Freeware
  51. Copyright Thomas SCHIEX  1991
  52. e-mail: schiex@cert.fr, schiex@irit.fr
  53.  
  54.  
  55.  
  56.  
  57. Table of Contents
  58.  
  59.  
  60. Table of Contents    1
  61. 5 The manual    3
  62. 5.1 An overview    4
  63. 5.1.1 Semantics    4
  64. 5.1.2 Syntax    4
  65. 5.1.3 Notation and terminology    4
  66. 5.2 Readable and non readable objects    5
  67. 5.2.1 The numbers (fixnums, bignums and floatings)    6
  68. 5.2.2 The lists    7
  69. 5.2.3 The cells    7
  70. 5.2.4 Bit-arrays    8
  71. 5.2.5 The strings    8
  72. 5.2.6 Symbols    8
  73. 5.2.7 Unreadable objects    9
  74. 5.2.8 Special characters and delimiters    10
  75. 5.3 The primitive expressions    10
  76. 5.3.1 Litteral references  (constants, “quoted” symbols …)    10
  77. 5.3.2 Variables references    11
  78. 5.3.3 Closure application    11
  79. 5.3.4 Closure creation    11
  80. 5.3.5 Conditional    12
  81. 5.3.6 Assignment    12
  82. 5.3.7 Non-memoïzing suspension    12
  83. 5.3.9 Environment    13
  84. 5.3.10 Defining macros    13
  85. 5.3.10 Defining external functions    13
  86. 5.3.11 Creating bindings    14
  87. 5.3.12 Sequence    14
  88. 5.3.12 Debugging    14
  89. 5.4 Predefined closures    16
  90. 5.4.1 Booleans    16
  91. 5.4.2 Equivalence predicates    16
  92. 5.4.3 Lists and conses    17
  93. 5.4.4 Symbols    19
  94. 5.4.5 Numbers    20
  95. 5.4.6 Closures    22
  96. 5.4.7 Macros    23
  97. 5.4.8 Cells (or vectors)    23
  98. 5.4.9 Environments    24
  99. 5.4.10 Bit-arrays    25
  100. 5.4.11 Entrées-Sorties    27
  101. 5.4.12 Erreurs et gestion d’errors    28
  102. 5.4.13 Control    29
  103. 5.4.14 System    30
  104. 5.5 Help interface    32
  105. 5.5.1 Configuration    33
  106. 5.5.2 Using the editor    34
  107. 5.5.2 The valuator and the “bugs”…    35
  108. Bibliography    37
  109. Examples    41
  110. Index    45
  111.  
  112.  
  113. Free use and non-commercial reproduction of the binaries of the interpreter is permitted, providing that the copyright notices are not removed and left unmodified.  Distribution by disk is permitted provided only a nominal copying fee is charged. Upload to commercial bulletin boards is also permitted, providing charges are only made for connect time, and there is no specific charge made for the file.
  114.  
  115. This software is actually freeware, but any donation (under any useful form), e-mail, s-mail or encouragement, is greatly appreciated by the author. I do not want to work (during week-ends) on something that is left unused except by four or five people. Thanks !
  116.  
  117. For queries and bug reports write or e-mail to the author:
  118.  
  119. Thomas SCHIEX
  120. Centre d’Etudes et de Recherche de Toulouse (ONERA)
  121. 2, Av Edouard Belin
  122. BP 4025
  123. 31055 TOULOUSE CEDEX
  124. FRANCE
  125. e-mail: schiex@cert.fr
  126.  
  127. No responsibilities accepted for bugs, but please let me know so I may try to fix them.
  128.  
  129. For your information, Help is mainly written in 680x0 assembly language. Porting it to C, or any “portable” language is not even considered (at this time).  
  130.  
  131. The archive file is organized as follows:
  132.  
  133. Paresseux: The  HELP interpreter. The needed memory may be changed via the Finder “Get Info”.
  134. Docs: as the name says…
  135. Help Files: as the name says… One may find various theorical examples from lambda-calculus, a constraint solver (“test and generate”, no forward checking or arc-consistency)…
  136. Resources: contains 1) resedit templates ressouces to insert in your Resedit program to ease Help ressources editing, 2) resedit resources to paste in Paressseux to change its appearance for French (and return to english) and to chanhe its semantics (turning Help in a strict language or returning to lazyness).t
  137. start: a file needed by Help, loaded upon startup. Must stay in the Help folder.
  138.  
  139.     Have fun !
  140. 5 The manual
  141. 
  142. Let us recall first that Help is, before anything else, a Lisp interpreter. Anybody having a good knowledge of Lisp, or even better Scheme ,may in a first step, immediately try the binaries, but beware of lazyness ! If you want to use Help and change its configuration, consider reading  §5.5FR.
  143.  
  144. 5.1 An overview
  145.  
  146. 5.1.1 .i.Semantics
  147.  
  148.  
  149. t  Help is a statically1  scoped language (identifier scope is lexical) as are Scheme, Algol… Each identifier occurrence is associated with a lexically visible binding of this identifier.
  150.  
  151. t  Help is non-sctrict, relying on call by need (also referred as “lazyness”) for every parameter passing as in Lazy Miranda, Hope…
  152.  
  153. t  Help is dynamically typed (types are latent), i.e. types are associated with values not variables. This is usual in Lisp, APL, Snobol…
  154.  
  155. t  Help closures (or procedures) are full citizens that may be dynamically created, gathered in any data structure (eventually infinite data structures)… Help shares this quality with every “functionnal” language (such as Hope, Miranda, Daisy…).
  156.  
  157. t  Help objects (closures, evironments, numbers) have unlimited extent. The memory management software will simply collect any object that may not be referenced by Help user (usually referred as the “GC” or “Garbage Collector”). The same type of system is used in every Lisp, APL, Prolog . It has been proposed for Ada, but no implementation i know has included it.
  158.  
  159. t  Help does not supports iteration, only recursion (lazyness and iteration do not originate from the same world). Therefore, the interpreter efficiently handles terminal recursions. This allows these recursions to operate with a fixed stack size consumption.
  160.  
  161. 5.1.2 Syntax
  162.  
  163. t    Help uses parenthesized for describing code and data. This syntax, whose simplicity is one of the main advantage is used (with some exceptions) by every Lisp dialect2.
  164.  
  165. 5.1.3 Notation and terminology
  166.  
  167. When Help semantics is yet undefined, we will consider that the value returned is an “undefined” value. In this case,  you should not rely on the peculiar value any implementation may return. You should notre that an unspecified value is different for the “unspecified error” which is a precisely specified value denoted by the symbol “?”.
  168.  
  169. In the following, the examples will always be presented in following typewriter style: exemples. The symbol “fl” used in these examples should be read as “whose value is printed as…”. Because of Help lazyness, there is an big difference between the internal representation (holding “suspended values”) and the external representation. This distinction is important. Infinite objects are usually limited by the interpreter’s printer. Dots (…) are used to denote the fact that the data structure is not completly printed. Example:
  170.  
  171. (letrec [(x (cons 1 x))] x) fl (1 1 1 1 1 1 1 …)
  172.  
  173. The § 5.3 and 5.4FR are composed of a sequence of definition. Each definition presents a closure or a syntactic form of the language and begins by a header specifying a model (how is the closure/syntactic form used), its type (the closures are separated in 2 types: ProcN whose arity is ficed, and NProc whose arity is not fixed), its arity (minimal arity for NProc), its arguments types (arguments  style). If there is no restriction on the arguments type, the word any  shall be used. The following types will be considered:
  174.  
  175. number      fixsize integer, “bignum” or floating point
  176. integer      fixsize integer, “bignum” 
  177. fix      fixsize integer 
  178. posfix      positive fixsize integer 
  179. bignum      “bignum” 
  180. floating      floating point
  181. smallnum      a number that is not a bignum
  182. list      conses or () (the empty list)
  183. cons      conses
  184. vector      vectors, also called “cells”
  185. environ     environment
  186. applicable     closure or fixpos
  187. symbol      symbol, error, constant,keyword…
  188. ident     variable or constant identifier 
  189. identv     variable identifier 
  190. keyword      syntactic keyword
  191. error      error
  192. bit-array      bit-array
  193. io-unit     input/output unit
  194. any      anything you may want
  195.  
  196. Example:
  197.  
  198. (cell=? vector posfix)    Closure:ProcN    2
  199.  
  200. says that  cell=? is a fixed arity closure (arity is equal to 2), whose arguments are a vector and a  number which should be a fixsize positive integer.
  201.  
  202. 5.2 Readable and non readable objects
  203.  
  204. At any time, a great deal of different objects exist in the memory (the heap). Most of these objects, whose external rpresentation is of matter to the user, are also readable (i.e., it is possible to give a syntactic description of the object that may be given to the Help “reader”. This reader will then create an internal representation of it). For pragmatic or feasability reasons, some objects have no external representations or eventually, have an external representation which is not readable.
  205.  
  206. The reader makes no distinction between upper or lower cases (except inside strings and for symbols interned with the“backslash” macro-char). So, the strings Foo, fOO denote a single  symbol. The space character (ASCII 32) eand carriage return(ASCII 13) are delimiters.
  207.  
  208. In the following, we will distinguish characters sequences (characters separated by delimiters (Cf § 5.2.7FR)) and strings (an object type in Help).
  209.  
  210. 5.2.1 The numbers (fixnums, bignums and floatings)
  211.  
  212. Rationnals and complexs are not yet available in Help. Moreover, there are strong restrictions on bignums use. 
  213.  
  214. 5.2.1.1 The .i.integers
  215.  
  216. An integer is always read in the current base. This base is fixed with the  closure ibase described later. The character sequences that are interpreted as numbers depend on this base. If the base is lower or equal to 10 (in decimal), the character between “0” and the base less one will be considered as digits. If the base is greater than 10 (It is limited to 36 internally), digits are extended using “a”…”z”. So, in hexa, The sequence “ff” represents an integer (not a symbol) whose value is 255 (decimal).
  217.  
  218. Let CarNum, be the set of characters representing digits.
  219.  
  220. number::=      number_unsigned    | 
  221.     +number_unsigned    | 
  222.     -number_unsigned
  223. number_unsigned::=     CarNum*
  224.  
  225. Examples:     123 +123 -123 +235987459862345  (base 10 at least)
  226.         12af  (base 16)  -foobar (base 29)
  227.  
  228. 5.2.1.1.1 Fixsize integers
  229.  
  230. When there is an internal representation as a “fixsize integer”, the reader will automatically use it. The value of a fixsize integer is between -2 147 483 648 and 2 147 483 647.
  231.  
  232. 5.2.1.1.2 Bignums
  233.  
  234. Every  integer that may not be internally represented as a fixsize integer will be read as a “bignum”. Pay attention that  “bignums” handling uses much stack space.
  235.  
  236. Allocation of temporary “bignums” on the stack during bignum computation implies that bignum size is limited:     
  237.                 1- by the heap size;
  238.                 2- by the stack size !
  239.  
  240. So, it is possible to get a “full stacks” error using a terminal recursion for Fibonacci if you use bignums (try (fib 50000)) …(NB: there is currently a bug in bignums multiplication)..
  241.  
  242. 5.2.1.2 .i.floatings
  243.  
  244. Every character sequence (that is not inside a string or a symbol interned via the “backslash” macro-char) holding a “.” will be considered as expressing a floating point. 
  245.  
  246. Motorola IEEE “extended-precision floating point” standard is actually used. It allows to express numbers between 1.9*10-4951 and 1.1*104932 . There are between 19 and 20 significative digits. It is also possible to denote forbidden operations (divide by zero…) generating “NaNs3” or infinity. These NaNs are not readable but are printable and used by Help (in fact your 68882).
  247.  
  248. The reading may be done using scientific notation (character “e” or “f” between mantissa and exponent) or classic (mantissa only). The floating is always read in decimal. The mantissa, as the exponent may follow a “+” or a “-”. 
  249.  
  250. Examples:     1.123456789123456789
  251.         1.1234f-2001
  252.         -233.2e+63
  253.  
  254. 5.2.2 The .i.lists ;(conses)
  255.  
  256. List expression relies on parenthesis and “conses”4 (as in Lisp):
  257.  
  258. t    The characters “(“, “)” et “|” sare for list expression and are delimiters;
  259. t    The empyu list will be denoted by a special symbol denoted by “()”;
  260. t    A cons  x(car | cdr) is represented by:   ( <car> | <cdr> ) where <car> is the representation of  “car”…;
  261. t    There is a simplified notation (when the cdr is a cons or the empty list): the pairs “| (“ and  the corresponding “)” may be omitted . So, one may write: (1 | ()) or (1).
  262.  
  263. Examples:      (1 | 2)
  264.         (1 2 3 4)
  265.         (1 | (2 | ()))
  266.         (1 (2 3 4) (5 (6)) 1)
  267.  
  268. 5.2.3 The .i.cells; (vectors)
  269.  
  270. A vector (or cell) will be represented using special delimiters “[“ and “]”.  A three elements cell e1, e2, e3 will be represented by [<e1> <e2> <e3>]
  271.  
  272. Examples:    []
  273.         [1 2 3]
  274.         [[1 2][2 3]]
  275.  
  276. 5.2.4 Bit-arrays
  277.  
  278. The delimiter “%” is used to express bit-arrays (.i.bit-arrays;). The sequence that follows should be composed of “0” or “1”.
  279.  
  280. Examples:    %
  281.         %11011000110110001101100011011000
  282.  
  283. 5.2.5 The .i.strings ;
  284.  
  285. The character “““ is used to express strings. Every character following a “““ upto the next  “““ swill be included in the string (including control chars, such as carriage return, linefeed…)
  286.  
  287. 5.2.6 .i.Symbols; (symbols, constants, errors…)
  288.  
  289. Every sequnce that is not in one of the previously defined syntactic domain and that does not hols a  “:” will express a simple symbol.
  290.  
  291. It is possible to force the reader to read a symbol for any sequence of character using the macro-character  “\”. So, reading the sequence“\12\” will create  an interned symbol whose name will be “12”.
  292.  
  293. Moreover, symbols are organized along a tree (as the packages tree in Le_Lisp) for the user use. A simple symbol will have  “()” as a father. It is possible to denote a son of a symbol (simple or not) by inserting a “:” and the son’s name. So:
  294.  
  295.     a      symbol “a”, father “()”
  296.     a:b      symbol “b” , father “a”, , father “()”
  297.     a:b:c:d:e    symbol “e” , father  “d”… 
  298.  
  299. Symbols ahave many different uses in Help:
  300.  
  301. t    symbols     ‘a
  302. t    variable     a
  303. t    keywords     (lambda (x) (1+ x))
  304. t    macro-expressions     (defmacro useless (lambda (t) ‘()))
  305. t    errors     ?:var-undef
  306. t    constants     (1+ 1)
  307.  
  308. IThere is no specific micro-syntax for each of these. The user may usually give the type of a symbol using specific closures or syntactic forms. 
  309.  
  310. Upon startup, several symbols are already defined.
  311.  
  312. 5.2.6.1 Keywords:
  313.  
  314. The following symbols are reserved .i.keywords;:
  315.  
  316. lambda cond define =! begin step nomemo
  317. defmacro quote let letrec bindings warn
  318.  
  319. 5.2.6.2 Errors:
  320.  
  321. The following table give the list of predefined .i.errors; . Usually, (this is not compulsory) an error is a son of the symbol” ?”.
  322.     
  323. Symbole    Definition
  324. ?    Undefined error
  325. ?:too-args    Too many arguments
  326. ?:few-args    Too few arguments
  327. ?:bad-type    Badly types arguments
  328. ?:bad-expr    Bad expression
  329. ?:syn-keyw    Keyword use forbidden here
  330. ?:syntx-er    General syntax error
  331. ?:mem-full    The heap is full
  332. ?:no-apply    The object us not applicable 
  333. ?:indx-out    Index out of bounds
  334. ?:strange!    A strange error has occurred
  335. ?:overflow    Overflow
  336. ?:cb-break    Break 
  337. ?:lispstck    The Lisp stack has been destroyed
  338. ?:contstck    The control stack has been destroyed
  339. ?:varundef    Undefined variable
  340. ?:stckfull    Piles pleines (collision)
  341. ?:maxlengt    Max length reached
  342. ?:io-error    I/O error
  343. ?:eof-error    End of file error
  344. ?:dead-cont    Chronologic continuation is dead
  345.  
  346. 5.2.6.3 Constants:
  347.  
  348. Many .i.constants; are predefineds. Most of them denote closures and will be described in §5.4.FR 
  349.  
  350. The symbol “()” is a constant whose value is itself that denotes the empty list;
  351. Thesymbol “†” is a constant whose value is itself that denotes the boolean TRUE;
  352. Thesymbol “ƒ” is a constant whose value is itself that denotes the boolean FALSE;
  353.  
  354. Pay attention that the symbol “()” is considered as TRUE in HELP. Only the boolean “ƒ” denotes FALSE.
  355.  
  356. 5.2.7 Unreadable objects
  357.  
  358. Among all the objects existing in memory, some are “unreadable”. These are the:
  359.  
  360. t    Environments (printable);
  361. t    Closures (printable);
  362. t    Code (partially);
  363. t    I/O Units (unprintable);
  364. t    Suspended forms (unprintable);
  365.  
  366.  
  367. 5.2.8 Special characters and delimiters
  368.  
  369. The following table gives the .i.special characters; list, whether they are delimiters, ad their corresponding  (if they exits) delimiters and role. When a number is given, It is the ascii code of the character. These characters are modifiable by the user (Cf §4.2.6FR).
  370.  
  371. C    Délim    Corresp    Role
  372. (    Yes    ) |    list, cons
  373. )    Yes    ( |    list, cons
  374. |    Yes    ( )    delimier between  CAR and CDR in a cons
  375. [    Yes    ]    start of  vector
  376. ]    Yes    [    end of  vector
  377. %    Yes    delim.    start of bit-array
  378. “    Yes    “    start and end of string
  379. ;    Yes    13    start of comment on a single line
  380. {    Yes    }    start of comment
  381. }    Yes    {    end of comment
  382. 32    Yes        space: delimiter
  383. 13    Yes        carriage return: delimiter
  384. \    Yes    \    force interning 
  385.  
  386.  
  387. 5.3 The .i.primitive expressions; in Help and derived forms
  388.  
  389. Every program Help is made of a sequence of definition expressed through define.
  390.  
  391. (.i.define; <ident> <any>)    Syntactic form    x
  392.  
  393. Allows to define <ident> as denoting <any>.
  394.  
  395. (.i.define; <closdef>  <body>)    Syntactic form    x
  396.  
  397. allows to define a closure. <body> is a sequnce of expression (body of the  closure). <closdef> is a a list whose CAR should be an identifier (name of the closure defined) . The CDR should be a formal parameters “list”  (Cf. lambda)
  398.  
  399.  
  400. 5.3.1 Litteral references  (constants, “quoted” symbols …)
  401.  
  402.  
  403. (.i.quote; <any>)    Syntactic form    x
  404. (’ <any>)    Syntactic form    x
  405.  
  406. Return the object whose external representation is <any>. It is used to reference litterals in the Help code. (quote <x>) may be abbreviated to  ‘<x>.
  407.  
  408. (quote (+ 1 2))    fl (+ 1 2)
  409.  
  410. <constant>    Syntactic form    x
  411.  
  412. Return the objetc whose external representation is <constant> (constant objects). It is used to reference litterals in the Help code. 
  413.  
  414. †    fl †
  415. 1    fl 1
  416.  
  417. 5.3.2 Variables references
  418.  
  419. <ident>    Syntactic form    x
  420.  
  421. The value returned is the value found at the location which is bound to the identifier in the current environment. If the variable is not bouns, the error?:varundef is returned.
  422.  
  423.  
  424. 5.3.3 Closure application
  425.  
  426. (<operator> <operand1>…)    Syntactic form    x
  427.  
  428. Closure application is simply expressed by writing the operator (closure) and the operands between parenthesis. The <operator>  is evaluated, but the <operand1>…  will be evaluated only if they are “used” (call by need).
  429.  
  430. (+ 1 2)                fl  3
  431. ((0 (list - +)) 32 10)    fl  22
  432.  
  433. Many closures are predefined. The user may define new closures through the syntactic form (lambda…). Please note that fixsize numbers are actually considered as closures. The positive fixnums select the “nth” element in a sequence (bit array, list, vector…). Negative fixnums return the “-nth” cdr of a list.
  434.  
  435. (0 ‘[a b c])            fl  a
  436. (-3 ‘(z y x w v u))        fl  (w v u)
  437.  
  438.  
  439. 5.3.4 Closure creation
  440.  
  441. (.i.lambda; <formals> <body>)    Syntactic form    x
  442.  
  443. Returns a closure holding  (among others) the environment that existed when the lambda expression was defined (captured environment). When the closure will be applied to effective arguments, its <body> will be evaluated in the capturated environment extended with the bindings of the <formals> to fresh locations holding the effective arguments. The value returned is the value of the last expression evaluated. If the <body> is empty, error ? is returned.
  444.  
  445. <formals> should take one of the following form:
  446.  
  447. •    (<ident1> … <identn>): The closure will have fixed arity “n”. When applied, each parameter will be bound to each argument. 
  448. •    <ident>: The closure will have variable arity. When applied the formal will be bound to a newly allocated list of the arguments.
  449. •    (<ident1> … | <identn>): The closure will have variable arity, (n-1) arguments at least. The last formal parameter will be bond to a newly allocated list of exceding arguments.
  450.  
  451.  <body> is a sequence of expression.
  452.  
  453. (lambda(x) x)                fl  {Closure (x) x) in ()}
  454. ((lambda x x) 1 2 3)            fl  (1 2 3)
  455.  
  456. 5.3.5 Conditional
  457.  
  458. The syntactic form COND is only there for efficiency (considering its frequent use). A fully compiled release of Help would allow the suppression of this form.
  459.  
  460. (.i.cond; <clause1>…)    Syntactic form    x
  461.  
  462. Each <clause> is a sequence of two expressions, the last <clause> may be restricted to a sequence of one expression.
  463.  
  464.  
  465. The first expression of the first <clause> is evaluated. If it returns a FALSE value (ƒ), then the following clause is handled (if any, oterwise it returns ƒ). If it returns an error, then this error is returned, else the vlaue of the second expression in the <clause>  is returned (if any, else first expression value is returned).
  466.  
  467. (cond (=? 2 (1+ 1)) “Yes” “No way”)    fl  Yes
  468. (cond (>? -3 0) -3
  469.       (<? -3 -5) (- 0 -3)
  470.       (+ 2 2))                    fl  4
  471.  
  472. 5.3.6 Assignment
  473.  
  474. (.i.=!; <ident> <any>)    Syntactic form    x
  475.  
  476. The location whose <ident> is bound to will receive the value of <any> in the current environment. This Syntactic form is one of the “non functionnal” feature of Help. 
  477.  
  478. (=! x 2)        fl  2
  479. (=! z (cons 1 z))    fl  (1 1 1 1 1 1 1 …)
  480.  
  481.  
  482. 5.3.7 Non-memoïzing suspension
  483.  
  484. (.i.nomemo; <boolean> <any>…)    Syntactic form    x
  485.  
  486. The forms <any> are evaluated one after the other. According to <boolean> value, every suspension that could be created by these forms will be a definitive (true) or memoïzed suspension… One should note that definitive (i.e. not memoïzed) suspensions are nevertheless easily “memoïzable” from “above”. If a suspension s1 created by nomemo is itself classically suspended (getting s2) , any access to the suspension s2 will induce s1 evaluation and the memoïzation of its value in s2 forbidding any new evaluation of s1 via s2.
  487.  
  488. (define z
  489.    (nomemo † (cons (print “CAR”)
  490.                    (print “CDR”))))        
  491. z                            fl  (? | ?)
  492.                                 prints “CAR” et “CDR”
  493. z                            fl (? | ?)
  494.                                  prints  “CAR” et “CDR”
  495. (define zz (list z z))
  496. zz                            fl  ((? | ?) (? | ?))
  497.                                 prints  “CAR”, “CDR” (twice)
  498. zz                            fl  ((? | ?) (? | ?))
  499.                                 prints nothing…
  500.  
  501. 5.3.9 Environment
  502.  
  503. (.i.bindings;)    Syntactic form    x
  504.  
  505. Returns the current environment. If it is the top level environment, the symbol () is returned. This form can NOT be a closure because the body of the closures are evaluated in the captured environment, but not in the current environment wich is inaccessible for them.
  506.  
  507. (bindings)                    fl ()
  508. ((lambda(x) (bindings)) 1)            fl {Env: «x=1» Then ()}
  509.  
  510.  
  511. 5.3.10 Defining macros
  512.  
  513. (.i.defmacro; <any>)    Syntactic form    x
  514.  
  515. Allows the definition of macros The syntax is identical to define syntax. When interpreting, any macro call is physically replaced (via car=!) by the value returned  upon the first evaluation (displacing macros). When the compiler is used, macros are expanded when compiling. It is therefore necessary to define macros before their use.
  516.  
  517. (defmacro (mapause m)
  518.    `(begin (prin “Pause à “)
  519.            (print ‘,m)
  520.            (pause)))
  521. (define (test n)(mapause test)(1+ n))
  522. Après a exécution:
  523. test            fl {Closure:((n) (begin (prin “Pause à “)
  524.                                          (print ‘test)
  525.                                            (pause)) (1+ n)))…}
  526.  
  527. 5.3.10 Defining external functions
  528.  
  529. (.i.defext; <fic><seg><nom><str> | <par>)    Syntactic form    x
  530.  
  531. Allows the importation of external functions (assembly langage for example, see in the “Divers” folder). The external code (written under MPW) must follows conventions given in the §4.5.1.3.1.2, qnd must be linked to the LibHelp.o library…(see folder “Divers”).
  532. The parameters are:
  533.  
  534. t    <fic>    file name (CODE ressources);
  535. t    <seg>    name of the segment containing the closure code;
  536. t    <nom>    name for the closure to be defined
  537. t    <str>    stricness bit vector (Cf setstrict)
  538. t    <par>    parameters of the external closure (as for define)
  539.         
  540. 5.3.11 Creating bindings
  541.  
  542. (.i.let; <bindings> <body>)    Syntactic form    x
  543.  
  544. The <body> is evaluated in the current environment extended with the <bindings>. The scope of the bindings is limited to the <body>.
  545.  
  546. <bindings> is a vector of lists that can take the following forms:
  547.  
  548. • (<ident> <any>): <ident> will be (lazily)  bound to the value of <any>.
  549. • (<closdef> <corpsclos>): allows to define a local closure (non recursive closure because of the scope of the bindings) more easily than by using a lambda expression. <corpsclos> is a sequence of any expressions, <closdef> is a list whose CAR should be an identifier (name of the  closure defined) and whoseCDR should be a “list” of formal parameters (Cf. lambda).
  550.  
  551. (let [(x 1.1)
  552.       ((double n)(+ n n))]
  553.      (double x))                fl 2.200000000000000e+00
  554.  
  555.  
  556. (.i.letrec; <bindings> <body>)    Syntactic form    x
  557.  
  558. The syntax is the same as for the let but the scope of the bindings created is equal to the lexical union of the <bindings> and the <body>. It is possible (as for the let) to define local functions (that can, here use recursion). Because of lazyness, there is no problem (as there are in Scheme by the way) in defining objetcs that immediately refer to identifier bound by the letrec . 
  559.  
  560. (let [(r (fib 20))            ;error en Scheme
  561.       ((fib n)                ;(fib undefined function)
  562.         (cond (<? n 2) 1
  563.               (+ (fib (1- n))(fib (- n 2)))))]
  564.      r)                    fl 10946
  565.  
  566. 5.3.12 Sequence
  567.  
  568. (.i.begin; <any1>…)    Syntactic form    x
  569.  
  570. The <any1> are evaluated one after the other…. Allows to group evaluations so that they may all be executed “at the same time”. This is especially useful when interacting with the user.
  571.  
  572. (let [(x (begin (prin “Entrez x”)(read)))]
  573.      (traiter x))                fl …according to traiter
  574.  
  575. 5.3.12 .i.Debugging
  576.  
  577. The .i.error handling; system of Help, because of the lazyness (that allows to build objects partially), does not stop the evaluation upon  error. According to the “evaluation mode”, an error may:
  578.  
  579. t    return an error object which is passed to the current continuation (ƒ  mode);
  580. t    return an error object which is passed to the current continuation and print an error message on the stder input/output unit (() mode);
  581. t    put the Help evaluator in a debug mode († mode).
  582.  
  583. (.i.pause;)    Syntactic form    x
  584.  
  585. Simply stop the cuurent evaluation and give the user the opportunity to use a new READ-EVAL-PRINT loop with a prompt  whose form will be “{n}† “ where n is the depth of  pauses. The loop will be abandonned as soon as the symbol † is evaluated (therefore, and because of the prompt appearance, it is enough to type the ENTER key to exit the loop). Any action is possible during the loop . The value returned is the symbol ? (undefined error).
  586.  
  587. (.i.warn; <ident> <any1>…)    Syntactic form    x
  588.  
  589. Evaluate the <any1>… in the evaluation mode specified by <ident> (Cf 5.3.12). One should note that suspended form that may be build will efectively be evaluated in the specified mode upon access, even if one as gone out of the  warn expression (suspended form do capture evaluation mode).
  590.  
  591. The debugger is actually a simple READ-EVAL-PRINT (Cf pause) that may be abandonned (to resume execution) by reading the symbol † (true). The expression and the value that (probably) are the reason for the error are printed. The closures and syntactic forms bindings, envar, stack… allow the user to look at the environment, the stack, values… The closure break will bring the user back to TopLevel. One should note that evaluating  (under debugger) may force suspensions that should not have been forced and therefore may modify the program behaviour. A not fully functionnal program may be greatly disturbed by such inspections.
  592.  
  593. (warn ƒ (+ 0 ‘a))            fl     ?:bad-type
  594.                             et aucun message d’error
  595.  
  596. (.i.step; <boolean> <any1>…)    Syntactic form    x
  597.  
  598. According to <boolean> value, will (or not) evaluate the <any1>… step by step.  One should note that suspended form will be evaluated step by step even if the control is out of the step scope (suspensions capture the current evaluation mode, including step or not mode). At each step, the function step? (user defined) is called with the form being evaluated and the current environment. If the value returned is flase (ƒ), step by step evaluation does not actually take effect for this form. Otherwise, the closure stepin is called with he form being evaluated and the current environment. The value returned is then given along with the value of the stepped through form to the stepout (user defined) closure. Predefined step?, stepin and stepout closures are proposed in the “Stepper” file. The main purpose of the boolean argument is to desactivate stepping locally.
  599.  
  600. Example:
  601.  
  602. (step † (+ 1 2))            fl     3  and the following session (for example):
  603. -> "(+ 1 2)"{1}† 
  604. -> "+"{1}† 
  605. <- "{Closure:{Code 680xx for +} Env:()}"{1}† 
  606. -> "1"{1}† 
  607. <- "1"{1}† 
  608. -> "2"{1}† 
  609. <- "2"{1}† 
  610. <- "3"{1}† 
  611. { = 3 }
  612.  
  613. The step by step mode is really very useful and powerful using the step?, stepin and stepout closures (and to the (step ƒ …) form that allows local steppin’ desactivation).
  614.  
  615. For example, using the following definition for step?:
  616.  
  617. (define (step? f e) 
  618.    (not (number? f)))
  619.  
  620. The previous step by step evaluation becomes:
  621.  
  622. (step † (+ 7 12))        fl     19 and the following session (for example):
  623. 1 -> "(+ 7 12)"{1}† 
  624. 2 -> "+"{1}† 
  625. 2 <- "{Closure:{Code 680xx for +} Env:()}"{1}† 
  626. 1 <- "19"{1}† 
  627. { = 19 }
  628.  
  629. 5.4 Predefined .i.closures; in Help
  630.  
  631. 5.4.1 Booleans
  632.  
  633. The two constants † and ƒ denote .i.booleans;. Nevertheless, in ANY test actually made by Help, any value that is not equal to ƒ is considered as true (except for errors, in this case the test fails and returns the error itself). Pay attention the the EMPTY LIST is actually true !
  634.  
  635. (.i.not; any)    Closure:ProcN    1
  636.  
  637. Returns † (true) if any   is equal to ƒ, otherwise returns ƒ.
  638.  
  639. (not †)            fl ƒ
  640. (not 3)            fl ƒ
  641. (not (list 1 2))    fl ƒ
  642. (not ƒ)            fl †
  643. (not ‘())        fl ƒ
  644.  
  645. (.i.boolean?; any)    Closure:ProcN    1
  646.  
  647. Returns † (true) if any  is equal to † or ƒ. Returns ƒ otherwise.
  648.  
  649. (boolean? †)        fl †
  650. (boolean? 3)        fl ƒ
  651.  
  652. 5.4.2 Equivalence predicates
  653.  
  654. The three .i.equivalence predicates; eq?, =? and equal? define three equivalence relations (reflexive, symetric transitive) on the Help objects. The relation defined by eq? is included in the relation defined by =? itself included in the relation defined by equal?.
  655.  
  656. (.i.eq?; any1 any2)    Closure:ProcN    2
  657.  
  658. Returns † (true) if the two objetcs are actually the same one (i.e exist at the same location in memory). Returns ƒ otherwise. Because of their unicity, this predicate is especially useful for symbols.
  659.  
  660. (eq? ‘a ‘a)        fl †
  661. (eq? 1 2)        fl ƒ
  662. (eq? 1 1)        fl undefined, probably false
  663.  
  664. (.i.neq?; any1 any2)    Closure:ProcN    2
  665.  
  666. Returns ƒ (false) if the two objetcs are actually the same one (i.e exist at the same location in memory). Returns † otherwise. Because of their unicity, this predicate is especially useful for symbols.
  667.  
  668. (neq? ‘a ‘a)        fl ƒ
  669. (neq? 1 2)        fl †
  670. (neq? 1 1)        fl undefined, probably true
  671.  
  672. (.i.=?; any1 any2)    Closure:ProcN    2
  673.  
  674. Returns † (true) if both objects are the same (i.e same address in memory) or if they have the same content (according to eq? for data structures (eg. conses, vectors) referencing other objects). Returns ƒ otherwise. This predicate is especially useful for numbers, bit-arrays and strings and in some cases for vectors or conses (lists or cells of symbols…).
  675.  
  676. (=? ‘a ‘a)        fl †
  677. (=? 1 2)        fl ƒ
  678. (=? 1 1)        fl †
  679. (=? %01 %01)        fl †
  680. (=? ‘[a a] ‘[a a])    fl †
  681.  
  682. (.i.<>?; any1 any2)    Closure:ProcN    2
  683.  
  684. Returns ƒ (false) if both objects are the same (i.e same address in memory) or if they have the same content (according to eq? for data structures (eg. conses, vectors) referencing other objects). Returns † otherwise. This predicate is especially useful for numbers, bit-arrays and strings and in some cases for vectors or conses (lists or cells of symbols…).
  685.  
  686. (<>? ‘a ‘a)                fl ƒ
  687. (<>? 1 2)                fl †
  688. (<>? 1 1)                fl ƒ
  689. (<>? %01 %01)                fl ƒ
  690. (<>? ‘(a | b) ‘(a | b))        fl ƒ
  691.  
  692. (.i.equal?; any1 any2)    Closure:ProcN    2
  693.  
  694. Returns † (true) if both objects are equivalent (in the sens of =?) or, otherwise, if their content is equivalent (in the sens of equal?). Returns ƒ otherwise. 
  695.  
  696. (equal? ‘a ‘a)            fl †
  697. (equal? 1 1)            fl †
  698. (equal? ‘(a b) ‘(a b))    fl †
  699.  
  700. (.i.nequal?; any1 any2)    Closure:ProcN    2
  701.  
  702. Returns ƒ (false) if both objects are equivalent (in the sens of =?) or, otherwise, if their content is equivalent (in the sens of equal?). Returns † otherwise. 
  703.  
  704. (nequal? ‘a ‘a)        fl ƒ
  705. (nequal? 1 1)            fl ƒ
  706. (nequal? ‘(a b) ‘(a b))    fl ƒ
  707.  
  708.  
  709. 5.4.3 Lists and .i.conses
  710.  
  711. A cons (or pointed pair) is an heterogenous data structures made of two fields called (for good old reasons i won’t bother you with…) CAR and CDR (pronounce could’er). This structures are actually mutable.  Accessing the fiels is done through “numerical selectors”.
  712.  
  713. The main use of conses is to represent .i.lists;. A list is defined as being either the empty list () or a cons whose  CDR is a list. 
  714. The empty list () is a special object actually denoted by a constant symbol. It contains no element and its length is 0.
  715.  
  716. (.i.list?; any)    Closure:ProcN    1
  717.  
  718. Returns ƒ (false) if any  is not a list (i.e. a cons or the symbol (), dotted lists are considered as lists). Returns † otherwise.
  719.  
  720. (list? ‘())        fl †
  721. (list? ‘(1 2 3))    fl †
  722. (list? 3)        fl ƒ
  723.  
  724. (.i.cons?; any)    Closure:ProcN    1
  725.  
  726. Returns † (true) if any  is a cons. Returns ƒ otherwise.
  727.  
  728. (cons? ‘())        fl ƒ
  729. (cons? ‘(1 2 3))    fl †
  730. (cons? 3)        fl ƒ
  731.  
  732. (.i.atom?; any)    Closure:ProcN    1
  733.  
  734. Returns ƒ (false) if any  is a cons. Returns † otherwise.
  735.  
  736. (atom? ‘())        fl †
  737. (atom? ‘(1 2 3))    fl ƒ
  738. (atom? 3)        fl †
  739.  
  740. (.i.cons; any1 any2)    Closure:ProcN    2
  741.  
  742. Returns a newly allocated cons whose CAR contains any1  value and whose CDR  contains any2  value.  The cons is different 5  of any existing object.
  743.  
  744. (cons 1 2)        fl (1 | 2)
  745. (cons ‘a ‘())        fl (a)
  746. (cons ‘(a b) ‘c)    fl ((a b) | c)
  747.  
  748.  
  749. (.i.car=!; cons any)    Closure:ProcN    2
  750.  
  751. Allows to write tha value ofany  in the CAR of a cons. Because of lazyness, unexpected effects may be observed. This closure is therefore very dangerous. It may disappear from future releases.
  752.  
  753. (car=! ‘(1 2) 3)    fl (3 2)
  754. (car=!  %1010 3)    fl ?:bad-type
  755.  
  756. (.i.cdr=!; cons any)    Closure:ProcN    2
  757.  
  758. Allows to write tha value ofany  in the CDR of a cons. Because of lazyness, unexpected effects may be observed. This closure is therefore very dangerous. It may disappear from future releases.
  759.  
  760. (cdr=! ‘(1 2) 3)    fl (1 | 3)
  761. (cdr=!  %1010 3)    fl ?:bad-type
  762.  
  763. (.i.null?; any)    Closure:ProcN    1
  764.  
  765. Returns ƒ (false) if any  value is not equal to the empty list. Returns † otherwise.
  766.  
  767. (null? ‘())        fl †
  768. (null? ‘(1 2 3))    fl ƒ
  769.  
  770. (.i.list; any …)    Closure:NProc    0
  771.  
  772. Returns the list of the arguments values.
  773.  
  774. (list ‘ts (+ 24 3) ‘65)    fl (ts 27 65)
  775. (list)                fl ()
  776.  
  777. (.i.length; list)    Closure:ProcN    1
  778.  
  779. Returns the length of list. The length of a list is defined by:
  780. t    the length of the empty list is 0;
  781. t    the length of a cons is 1 plus the length of its  CDR.
  782.  
  783. (length ‘())                fl 0
  784. (length ‘(1 2 3))            fl 3
  785. (length ‘(mcl (1 2 3) (a b)))    fl 3
  786. (length 1)                fl ?:bad-type
  787.  
  788.  
  789. (.i.append; list1 any)    Closure:ProcN    2
  790.  
  791. Returns a list made of the elements of the first listlist1  followed by the elements of the list any. The second arg. (any) may be something else than a list.
  792.  
  793. (append ‘(1 2 3) ‘(4 5 6))    fl (1 2 3 4 5 6)
  794. (append ‘() ‘(a b))        fl (a b)
  795. (append ‘(a b) ‘(c | d))    fl (a b c | d)
  796.  
  797. (.i.∞; any)    Closure:ProcN    1
  798.  
  799. Returns an infinite list whose elements are all equal to the value of any.
  800.  
  801. (∞ 1)        fl (1 1 1 1 1 1…)
  802. (∞ (+ 2 3))    fl (5 5 5 5 5 5…)
  803.  
  804. (.i.…; number)    Closure:ProcN    1
  805.  
  806. Returns a n infinite list made of the integers after number.
  807.  
  808. (… 1)        fl (1 2 3 4 5 6…)
  809. (… (- -2 1))    fl (-3 -2 -1 0 1 2…)
  810.  
  811.  
  812. 5.4.4 Symbols
  813.  
  814. The .i.symbols; main property is that two identical symbols (micro-syntax) are actually identical in memory (in the sens of eq? ). This property is very useful to represent variables, constant identifiers, keywords. Help also use symbols to denote errors.
  815.  
  816. (.i.symbol?; any)    Closure:ProcN    1
  817.  
  818. Returns † (true) if any  is a symbol, otherwise returns the object any.
  819.  
  820. (.i.intern; symbol any)    Closure:ProcN    2
  821.  
  822. Returns a symbol whose name is any  value (that should be a string or a symbol)  and whose father (in the symbols hierarchy) is symbol.
  823.  
  824. (intern ‘père “fils”)    fl père:fils
  825. (intern ‘père ‘fils)    fl père:fils
  826.  
  827.  
  828. 5.4.5 Numbers
  829.  
  830. According to their position, .i.numbers; may be interpreted as closures (numerical selectors) or as numerical data. This double point of view may be considered as a semantical weakness but is of great ease (very useful from a pragmatical point of view).
  831.  
  832. For numerical selectors see §5.3FR.
  833.  
  834. (.i.+; number number)    Closure:ProcN    2
  835.  
  836. Returns the sum of its arguments values. If one of the numbers is a floating, the result will be floating. 
  837.  
  838. (+ 10 10)        fl 20
  839. (+ 1 2.312)        fl 3.312000000000000e+00
  840. (+ 9999999999 1)    fl 10000000000
  841. (+ 1 ‘a)        fl ?:bad-type
  842.  
  843. (.i.-; number number)    Closure:ProcN    2
  844.  
  845. Returns the difference of its arguments values. If one of the numbers is a floating, the result will be floating. 
  846.  
  847. (- 10 10)        fl 0
  848. (- 2.312 1)        fl 1.312000000000000e+00
  849. (- 9999999999 1)    fl 9999999998
  850. (- 1 ‘a)        fl ?:bad-type
  851.  
  852. (.i.1+; number)    Closure:ProcN    1
  853.  
  854. Returns one plus its argument value. If the number is a floating, the result will be floating. 
  855.  
  856. (1+ 10)        fl 11
  857. (1+ %)        fl %00000000000000000000000000000001
  858. (1+ ‘a)        fl ?:bad-type
  859.  
  860. (.i.1-; number)    Closure:ProcN    1
  861.  
  862. Returns its argument value minus one. If the number is a floating, the result will be floating. 
  863.  
  864. (1- 10)        fl 9
  865. (1- ‘a)        fl ?:bad-type
  866.  
  867. (.i.*; number1 number2)    Closure:ProcN    2
  868.  
  869. Returns the product of its arguments values. If one of the numbers is a floating, the result will be floating. 
  870.  
  871. (* 10 23)    fl 230
  872. (* ‘a 2)    fl ?:bad-type
  873. (* 1e10 2)    fl 2.000000000000000e10
  874.  
  875. (.i./; smallnum1 smallnum2)    Closure:ProcN    2
  876.  
  877. Returns the result from the division of its arguments values. If one of the numbers is a floating, the result will be floating. If both numbers are integers, the result will be an integer.
  878.  
  879. (/ 23 10)        fl 2
  880. (/ ‘a 2)        fl ?:bad-type
  881. (/ 23 10.0)        fl 2.300000000000000e0
  882.  
  883. (.i.modulo; fix1 fix2)    Closure:ProcN    2
  884.  
  885. Returns the remainder of the division of fix1   value by fix2   value.
  886.  
  887. (modulo 23 10)    fl 3
  888. (modulo ‘a 2)    fl ?:bad-type
  889.  
  890. (.i.<?; number1 number2)    Closure:ProcN    2
  891.  
  892. Returns ƒ if  number1   value is not strctly less than number2   value. Returns number1  value otherwise.
  893.  
  894. (<? 23 10)        fl ƒ
  895. (<? ‘a 2)        fl ?:bad-type
  896. (<? 12 20)        fl 12
  897.  
  898. (.i.>?; number1 number2)    Closure:ProcN    2
  899.  
  900. Returns ƒ if  number1   value is not strctly more than number2   value. Returns number1  value otherwise.
  901.  
  902. (>? 23 10.0)            fl 23
  903. (>? ‘a 2)            fl ?:bad-type
  904. (>? 20 12345678987654321)    fl ƒ
  905.  
  906. (.i.zero?; number)    Closure:ProcN    1
  907.  
  908. Returns ƒ if  number value is not equal to zero. Returns number  otherwise. 
  909.  
  910. (zero? 0)        fl 0
  911. (zero? ‘a)        fl ?:bad-type
  912.  
  913. (.i.float; number)    Closure:ProcN    1
  914.  
  915. Converts number  value to floating.
  916.  
  917. (float 0)        fl 0.00000000000e+0
  918.  
  919. (.i.cos; number)    Closure:ProcN    1
  920.  
  921. Returns the cosinus (floating) of number  value in radians.
  922.  
  923. (.i.sin; number)    Closure:ProcN    1
  924.  
  925. Returns the sinus (floating) of number  value in radians.
  926.  
  927. (.i.tan; number)    Closure:ProcN    1
  928.  
  929. Returns the tangent (floating) of number  value in radians.
  930.  
  931. (.i.acos; number)    Closure:ProcN    1
  932.  
  933. Returns the arc-osinus (floating) of number  value in radians.
  934.  
  935. (.i.asin; number)    Closure:ProcN    1
  936.  
  937. Returns the arc-sinus (floating) of number  value in radians.
  938.  
  939. (.i.atan; number)    Closure:ProcN    1
  940.  
  941. Returns the arc-tangent (floating) of number  value in radians.
  942.  
  943. (.i.cosh; number)    Closure:ProcN    1
  944.  
  945. Returns the hyperbolic cosinus (floating) of number  value.
  946.  
  947. (.i.sinh; number)    Closure:ProcN    1
  948.  
  949. Returns the hyperbolic sinus (floating) of number  value.
  950.  
  951. (.i.tanh; number)    Closure:ProcN    1
  952.  
  953. Returns the hyperbolic tangent (floating) of number  value.
  954.  
  955. (.i.atanh; number)    Closure:ProcN    1
  956.  
  957. Returns the hyperbolic arc-tangent (floating) of number  value.
  958.  
  959. (.i.log; number)    Closure:ProcN    1
  960.  
  961. Returns the neperian logarithm (floating) of number  value.
  962.  
  963. (.i.exp; number)    Closure:ProcN    1
  964.  
  965. Returns the exponential (floating) of number  value.
  966.  
  967. (.i.sqrt; number)    Closure:ProcN    1
  968.  
  969. Returns the square root (floating) of number  value.
  970.  
  971. (.i.ibase; fixpos)    Closure:ProcN    1
  972.  
  973. Modifies lthe current reading numerical base of the reader. The fixpos  value should be between 2 and 36. Returns its argument value. Cf §5.2.1FR.
  974.  
  975. (ibase 10)        fl 10
  976.  
  977. 5.4.6 Closures
  978.  
  979. The closures are made of a “code” that is waiting for a sequence of expressions and from an environment. For optimisation, each closure contains a 16 bits bit-array to express the closure strictness with respect to the  15 first arguments (15 first bits) and the following one (last bit). This bit-array is automatically filled by the compiler (to some extent only), but not at all by the interpreter.
  980.  
  981.  
  982. (.i.apply; applicable list)    Closure:ProcN    2
  983.  
  984. Applies the closure or the numerical selector applicable  to the list of argument list. 
  985.  
  986. (apply 1 ‘((a)))        fl a
  987. (apply + ‘(1 2))        fl 3
  988.  
  989. (.i.getcode; closure)    Closure:ProcN    1
  990.  
  991. Returns the code (interpreted or compiled) of the closure.
  992.  
  993. (getcode 1+)            fl {Code 680xx for 1+}
  994. (getcode (lambda(x)x))    fl ((x) x)
  995.  
  996. (.i.getenv; closure)    Closure:ProcN    1
  997.  
  998. Returns the closure  captured environment.
  999.  
  1000. (getenv 1+)            fl ()
  1001. (getenv
  1002.    (let [(x 2)]
  1003.       (lambda(x)x)))        fl {Env: «x=2» Then ()}
  1004.  
  1005. (.i.getstrict; closure)    Closure:ProcN    1
  1006.  
  1007. Returns the bit-array associated to the closure  that gives the closure strictness (see above).
  1008.  
  1009. (getstrict cons)        fl %00000000000000000000000000000000
  1010. (getstrict +)            fl %11000000000000000000000000000000
  1011.  
  1012. (.i.setstrict; closure bitarray)    Closure:ProcN    2
  1013.  
  1014. Allows the user to give the strictness of the closure . May lead to important (10-20%) improvements in execution time and memory usage if strict.
  1015.  
  1016. 5.4.7 Macros
  1017.  
  1018. (.i.expand; list)    Closure:ProcN    1
  1019.  
  1020. The list  should be a “quoted” macro call. Returns the result of the  macro expansion.
  1021.  
  1022. (expand ‘(quasiquote (a (unquote b))))    fl (list ‘a b)
  1023.  
  1024.  
  1025. 5.4.8 Cells (or vectors)
  1026.  
  1027. The .i.vectors; are heterogenous structures indexed by integers. These structures (as conses) are mutable. Because of lazyness, mutation is potentially dangerous.
  1028.  
  1029. When accessed using “nemerical selectors”, vectors are indexed from 0 (first element) to the vector length minus one. the length of a vector is obtained using closure blength and then by substracting one from the result.
  1030.  
  1031.  
  1032. (.i.cell?; any)    Closure:ProcN    1
  1033.  
  1034. Returns ƒ (false) if any   is not a vector, otherwise returns the vector itself.
  1035.  
  1036. (cell? 23)        fl ƒ
  1037. (cell? [1 2 3])    fl [1 2 3]
  1038.  
  1039. (.i.cell; any …)    Closure:NProc    0
  1040.  
  1041. Returns a vector whose content is any ….
  1042.  
  1043. (cell 0 1 2)            fl [0 1 2]
  1044. (cell ‘d ‘e 1 ‘(a) [1])    fl [d e 1 (a) [1]]
  1045.  
  1046. (.i.makecell; fixpos)    Closure:ProcN    1
  1047.  
  1048. Returns a vector having size fixpos  and whose fields are all initialized to ?.
  1049.  
  1050. (makecell 2)            fl [? ?]
  1051.  
  1052. (.i.cell=!; vector fixpos any)    Closure:ProcN    3
  1053.  
  1054. Writes any in the vector, position fixpos. Returns the vector. This non-funtionnal closure has unexpected effects when used (because of Help lazyness).
  1055.  
  1056. (cell=! ‘[a b c] 0 0)    fl [0 b c]
  1057. (cell=! [0 1 2] 3 1)    fl ?:indx-out
  1058.  
  1059.  
  1060. 5.4.9 Environments
  1061.  
  1062. The Syntactic form bindings allos one to access the current .i.environnement;. Some closures allows then to handle these environments, or to create new ones. Numerical selectors allows one to access environment contents (non empty env.). If N is the blength of the environment, the following indexes are valid: 
  1063. • Index 0: the lower environment (previous frame);
  1064. • from 1 to (N-2)/2: the values of the variables bound in the environment;
  1065. • from (N-2)/2+1 to N-1: the identifiers of the variables bound.
  1066.  
  1067. Note that the compiler may rely on so-called “short-environments” that do not contains names variables, only their values.
  1068.  
  1069. (.i.environment?; any)    Closure:ProcN    1
  1070.  
  1071. Returns ƒ (false) if any  is not an environment, otherwise returns the environment itself. as the Syntactic form bindings returns () if the current enviroement is the toplevel environment, the empty  list is considered to be an environment.
  1072.  
  1073. (environment? 23)                fl ƒ
  1074. (environment? ‘())                fl ()
  1075. (environment (let [(x 2)] (bindings)))    fl {Env: «x=2» Then ()}
  1076.  
  1077. (.i.binding=?; ident environ)    Closure:ProcN    2
  1078.  
  1079. Returns the value of ident  in environ . If the variable is undefined in the environment, The error  ?:varundef is returned.
  1080.  
  1081. (binding=? ‘1+ ‘())                fl {Code6800x for 1+}
  1082. (binding=? ‘x (let [(x 2)] (bindings)))    fl 2
  1083. (binding=? ‘a ‘())                fl ?:varundef
  1084.  
  1085. (.i.binding=!; ident environ any)    Closure:ProcN    3
  1086.  
  1087. Modifies the value of ident  in environ. Returns the value of environ.
  1088.  
  1089. (binding=! ‘1+ ‘() 2)            fl ()
  1090. (binding=! ‘a ‘() 2)            fl ()
  1091.  
  1092. (.i.makeenv; ident1 …)    Closure:NProc    0
  1093.  
  1094. Returns an environment where the ident are all bound to ?. This environment is automatically linked to the current environnement (the lower frame will be the current env).
  1095.  
  1096. (makeenv ‘a ‘b)    fl {Env: «a=?» «b=?» Then ()}
  1097. (makeenv 1)        fl ?:bad-type
  1098.  
  1099. (.i.envar; environ)    Closure:ProcN    1
  1100.  
  1101. Returns a vector that contains all the identifiers of the environment environ.  Especially useful during debugging  to have a look at an anvironment without forcing all the values referenced in the environment.
  1102.  
  1103. (envar (makeenv ‘a ‘b))    fl [a b]
  1104.  
  1105. 5.4.10 Bit-arrays
  1106.  
  1107. Bit arrays are especially useful to represent sets (and in AI for every “propositionnal logic oriented” software: a clause is simply two sets of litterals, i.e. two bit-arrays). The set-operations are efficiently managed (intersection, union…). Pay attention that bit-set operations are destructive for efficiency. A functionnal behaviour may be obtained using closure bcopy.
  1108.  
  1109. Bit-array reading is obtained through “numerical selectors” (index starting at 0).
  1110.  
  1111. (.i.bitarray?; any)    Closure:ProcN    1
  1112.  
  1113. Returns ƒ (false) if any  is not a bit-array, otherwise returns the array itself.
  1114.  
  1115. (bitarray? 23)    fl ƒ
  1116. (bitarray? %)    fl %
  1117.  
  1118.  
  1119. (.i.makebitarray; posfix)    Closure:ProcN    1
  1120.  
  1121. Returns a bit-array whose length is at least equal to posfix , all  bits cleared.
  1122.  
  1123. (makebitarray 0)    fl %
  1124. (makebitarray 10)    fl %00000000000000000000000000000000
  1125.  
  1126. (.i.bitand!; bitarray1 bitarray2)    Closure:ProcN    2
  1127.  
  1128. Logical AND between bitarray1  and  bitarray2. The result is stored in bitarray2. If the arrys have not the same siwze, the operation is restricted to the smaller argument. This operation is destructive, use bcopy if you need a “functionnal” behaviour.
  1129.  
  1130. (bitand! %0011 %0101)    fl %00010000000000000000000000000000
  1131.  
  1132. (.i.bitor!; bitarray1 bitarray2)    Closure:ProcN    2
  1133.  
  1134. Logical OR between bitarray1  and  bitarray2. The result is stored in bitarray2. If the arrys have not the same siwze, the operation is restricted to the smaller argument. This operation is destructive, use bcopy if you need a “functionnal” behaviour.
  1135.  
  1136. (bitor! %0011 %0101)    fl %01110000000000000000000000000000
  1137.  
  1138. (.i.bitxor!; bitarray1 bitarray2)    Closure:ProcN    2
  1139.  
  1140. Logical XOR between bitarray1  and  bitarray2. The result is stored in bitarray2. If the arrys have not the same siwze, the operation is restricted to the smaller argument. This operation is destructive, use bcopy if you need a “functionnal” behaviour.
  1141.  
  1142. (bitor! %0011 %0101)    fl %01100000000000000000000000000000
  1143.  
  1144. (.i.bitnot!; bitarray)    Closure:ProcN    1
  1145.  
  1146. Logical NOT of bitarray.  The result is stored in bitarray. This operation is destructive, use bcopy if you need a “functionnal” behaviour.
  1147.  
  1148. (bitnot! %01)    fl %10111111111111111111111111111111
  1149.  
  1150. (.i.bitcount; bitarray)    Closure:ProcN    1
  1151.  
  1152. Returns the number of bits set in bitarray. Execution time in the order of the number of bits set.
  1153.  
  1154. (bitcount %0101)    fl 2
  1155.  
  1156.  
  1157. (.i.bitfind; bitarray)    Closure:ProcN    1
  1158.  
  1159. Returns the position of the first bit set in bitarray  (if any). Returns ƒ otherwise.
  1160.  
  1161. (bitfind %0001)    fl 3
  1162. (bitfind %)        fl ƒ
  1163.  
  1164. (.i.bitset!; bitarray fixpos)    Closure:ProcN    2
  1165.  
  1166. Sets (to 1) the bit  at the position fixpos of  bitarray . Returns the bit-array. This operation is destructive, use bcopy if you need a “functionnal” behaviour.
  1167.  
  1168. (bitset! %0 0)    fl %10000000000000000000000000000000
  1169.  
  1170. (.i.bitclr!; bitarray fixpos)    Closure:ProcN    2
  1171.  
  1172. Clears (to 0) the bit  at the position fixpos of  bitarray . Returns the bit-array. This operation is destructive, use bcopy if you need a “functionnal” behaviour.
  1173.  
  1174. (bitclr! %1 0)    fl %00000000000000000000000000000000
  1175.  
  1176. (.i.bitchg!; bitarray fixpos)    Closure:ProcN    2
  1177.  
  1178. Flip the bit  at the position fixpos of  bitarray . Returns the bit-array. This operation is destructive, use bcopy if you need a “functionnal” behaviour.
  1179.  
  1180. (bitchg! %0 0)    fl %10000000000000000000000000000000
  1181.  
  1182. (.i.zero?; bitarray)    Closure:ProcN    1
  1183.  
  1184. Returns  ƒ if one of the bits of bitarray   is set. Returns bitarray  otherwise.
  1185.  
  1186. (zero? %00010)    fl ƒ
  1187. (zero? %000)    fl %00000000000000000000000000000000
  1188.  
  1189. 5.4.11 Entrées-Sorties
  1190.  
  1191. All input/output is done through so-called “.i.input/output; units”. These units may denote a file or a text window. As in C, the variables  .i.stdi;, .i.stdo ;et .i.stder ;denote the units (resp.) for input, output and error. Upon startup, stdi and stdo are bound to the “current selected window” and stder to the “Transcript” window. It is possible to modify the content of this variables to read/write to files…
  1192.  
  1193.  
  1194. (.i.read;)    Closure:ProcN    0
  1195.  
  1196. Reads a Help expression in the input-output unit in stdi. Returns the internal representation of the expression read.
  1197.  
  1198. (.i.print; any)    Closure:ProcN    1
  1199.  
  1200. Print the external representation of the object any   on the current output i/o unit (contained in the variable stdo) and then prints a carriage return. One should note that Help printer will force every suspended form in the object (so as to print the object in its completeness). If you need to print an object without forcing its content, use closure printdebug. Returns ?.
  1201.  
  1202. (.i.prin; any)    Closure:ProcN    1
  1203.  
  1204. Print the external representation of the object any   on the current output i/o unit (contained in the variable stdo). One should note that Help printer will force every suspended form in the object (so as to print the object in its completeness). If you need to print an object without forcing its content, use closure printdebug. Returns ?.
  1205.  
  1206. (.i.prinlength; fixpos)    Closure:ProcN    1
  1207.  
  1208. The max. printing length (in number of printed objects) is set to fixpos. Especially useful to print (partially) infinite objects. Returns the value of its argument.
  1209.  
  1210.  
  1211. (.i.prindepth; fixpos)    Closure:ProcN    1
  1212.  
  1213. The max. printing depth (in number of printed objects) is set to fixpos. Especially useful to print (partially) infinite objects. Returns the value of its argument.
  1214.  
  1215. (.i.openi; string)    Closure:ProcN    1
  1216.  
  1217. Opens a file for reading only. The path is given in string . It must be specified using “:” to separate folders. The startup folder is the “default” folder. Returns an input-output unit associated to the file.
  1218.  
  1219. (openi “HD:Help:bob”)    fl «IO-Unit»
  1220.  
  1221. (.i.openo; string)    Closure:ProcN    1
  1222.  
  1223. Opens a file for writing only. The path is given in string . It must be specified using “:” to separate folders. The startup folder is the “default” folder. Returns an input-output unit associated to the file.
  1224.  
  1225. (openo “HD:Les:deux-pierre(s)”)    fl «IO-Unit»
  1226.  
  1227. (.i.close; iounit)    Closure:ProcN    1
  1228.  
  1229. Closes the file associated to the iounit . Returns ?. Every attempt to read/write to a closed i-o unit will return a ?:bad-type error.
  1230.  
  1231. (.i.prinio; any  iounit)    Closure:ProcN    2
  1232.  
  1233. IPrint the external representation of the object any   on the output i/o unit iounit. One should note that Help printer will force every suspended form in the object (so as to print the object in its completeness). If you need to print an object without forcing its content, use closure printdebug. Returns ?.
  1234.  
  1235. (.i.readio; iounit)    Closure:ProcN    1
  1236.  
  1237. Reads a Help expression in the input-output unit iounit. Returns the internal representation of the expression read. Returns error ?:eof-error when end of file is reached.
  1238.  
  1239. (.i.flushio; iounit)    Closure:ProcN    1
  1240.  
  1241. Flush the “buffers”  of iounit. Especially useful when the io-unit is associated to a window (multiple writers).
  1242.  
  1243. (.i.load; string)    Closure:ProcN    1
  1244.  
  1245. Open the given file, read and evaluates all its content, then close the file.
  1246.  
  1247.  
  1248. 5.4.12 Erreurs et gestion d’.i.errors
  1249.  
  1250.  
  1251. (.i.printdebug; any)    Closure:ProcN    1
  1252.  
  1253. Prints, on the io-unit in stder, the external representation of the value of any  without forcing any of the suspensions in the object (then prints a Carriage return). A suspension is printed as a tuple made of the suspended code and the captured environment. Returns ?.
  1254.  
  1255. (printdebug (cons a b))    affichera  ({Susp: a in ()} | {Susp: b in ()})
  1256.  
  1257. (.i.error; error any)    Closure:ProcN    2
  1258.  
  1259. Raise error error  with message any. According to the current “error handling mode”, it will result in message printing, value return or debugger call.
  1260.  
  1261. (.i.error?; any)    Closure:ProcN    1
  1262.  
  1263. Returns † if the value ofany  is an “error” (Cf the closure type). Returns ƒ otherwise.
  1264.  
  1265. (error? 1)        fl    ƒ
  1266. (error? (1+ ‘a))    fl    †
  1267.  
  1268. (.i.explain; error)    Closure:ProcN    1
  1269.  
  1270. Returns the error message associated to error.
  1271.  
  1272. (explain ‘?:varundef)    fl "Variable non définie"
  1273.  
  1274.  
  1275. 5.4.13 .Control
  1276.  
  1277. Closures for .i.control; are few in Help. The introduction of escapes or explicit continuation (à la Scheme) brings few comfort in a non-parallel lazy frame. Nevertheless, the closure force allows to give to these facility all their original power, the primitive call/ep is used to express escapes (efficeint, but very limited use); the closure call/cc allows to capture the current continuation (à la Scheme).
  1278.  
  1279. (.i.call/ep; closure)    Closure:ProcN    1
  1280.  
  1281. Gives to the closure  (that should accept one argument) a closure of type ProcN, arity 1 that (when called) will allow to escape from the continuation and will give its argument value to tha call/ep continuation (as call/cc in Scheme). Nevertheless, this is only a “chronological continuation ” whose extent is limited6 (stack overwriting); therefore, it is useful only for “escapes” (catch/throw, tag/exit facilities).
  1282.  
  1283. (call/ep (lambda(k)(k 1) 2))    fl 1
  1284.  
  1285. (.i.call/cc; closure)    Closure:ProcN    1
  1286.  
  1287. Gives to the closure  (that should accept one argument) a closure of type ProcN, arity 1 that (when called) will allow to escape from the continuation and will give its argument value to tha call/ep continuation (as call/cc in Scheme). This continuation as unlimited extent but may need much memory and execution time (stacks are simply copied).
  1288.  
  1289. (call/cc (lambda(k)(k 1) 2))    fl 1
  1290.  
  1291. (.i.force; any)    Closure:ProcN    1
  1292.  
  1293. From a fonctionnal point of view, it is identity. However, it recursively forces all the suspensions in the value of any. It is essentially useful to simulate the transformation of Help suspensions in “futures” of a parallel machine and also to give back some dirty tricks (affectation, escapes…)  all their “functionnalities”…
  1294.  
  1295. (=! x 2)                fl 2
  1296. (=! x (force (cons 1 x)))        fl (1 | 2)    ;but not (1 1 1 1 1 1 1 1…)
  1297. (force
  1298.    (call/cc 
  1299.      (lambda(k)
  1300.        (cons 1 (k ‘Sortir)))))    fl Sortir    ;et non (1 | <teratos>)
  1301.  
  1302.  
  1303. (.i.if; any1 any2 …)    Closure:NProc    0
  1304.  
  1305. Because of Help lazyness, the conditionnal may be implemented as a closure in  Help. The closure if is the embodiement as a closure of the syntactic form cond (that is kept only for efficiency reasons !).
  1306.  
  1307. (if (eq? ‘a ‘b) 1
  1308.     (=? 1 2)    2
  1309.     3)                fl 3
  1310.  
  1311. (.i.eval; any environ)    Closure:ProcN    2
  1312.  
  1313. In the interpreted release of Help (if a realistic compiler may exist one day), this closure evaluate the form quelconque  in the environment environ.  In a compiled release, it should compile the form any  in the environment environ  and then execute the code compiled. One should note that if any  is already compiled (CODE type object) , the code is immediatly executed in the environment given. This allows an efficient EVAL execution if the forms have been precompiled (for multiple evaluation, exemple: constraints in a CSP like constraint solver).
  1314.  
  1315. (eval 1 ‘())                         fl 1
  1316. (eval (cons x x) ((lambda(x) (bindings)) ‘a))     fl (a | a)
  1317.  
  1318. (.i.or; any1…)    Closure:NProc    0
  1319.  
  1320. Evaluates the any1…  forms one after the other up to the point when one the value returned is not false or end of the  any1…  Returns the value of the last form evaluated.
  1321.  
  1322. (or (null? ‘a) (null? ‘()))         fl †
  1323. (or (number? ‘a) (number? 1.1))    fl 1.100000000000000e00
  1324.  
  1325. (.i.and; any1…)    Closure:NProc    0
  1326.  
  1327. Evaluates the any1…  forms one after the other up to the point when one the value returned is false or end of the  any1…  Returns the value of the last form evaluated.
  1328.  
  1329. (and (null? ‘a) (null? ‘()))     fl ƒ
  1330. (and (number? 10) (number? 1.1))    fl 1.100000000000000e00
  1331.  
  1332.  
  1333. 5.4.14 System
  1334.  
  1335. Here are all the closures that have some accointance with memory management, operating system…
  1336.  
  1337. (.i.type; any)    Closure:ProcN    1
  1338.  
  1339. Returns the type (contained in the “tag” of the referenced block) of any  value as a number (fix). The following table, or simple application of the closure type to an object gives the type interpretation:
  1340.  
  1341. integer fixed size    1    floating point number    2
  1342. bit-array    3    string    4
  1343. input/output unit    5    variable identifier (symbol)    6
  1344. constant identifier  (symbol)    7    error (symbol)    8
  1345. macro (symbol)    9    primitive key-word (symbol)    10
  1346. compiled or assembly code    11    closure    12
  1347. cons    13    vector    14
  1348. indirection7    15    environment    16
  1349. short environnement      17    bignum    19
  1350. memoïzable suspension8    20    non-memoïzable suspension9    21
  1351.  
  1352. (type ‘a)                fl 6
  1353. (type (+ 9999999999 1))        fl 19
  1354.  
  1355. (.i.coerce; any fixpos)    Closure:ProcN    2
  1356.  
  1357. Physically changes the type of any  in fixpos . Use type closure to get existing type. This function may foul the GC (Garbage COllector or “Glaneur de Cellules”), that will free unexisting or referencable  blocks leading to hard errors(Bus Error, Adress Error…). Harmless type conversion are possible between elements of the following group of types (note that coerce only changes the type of the object, not its content).
  1358.  
  1359. t    1 2 3 4 19     numbers et bit-arrays
  1360. t    6 7 8 9 10     identificateurs…
  1361. t    16 17 14     environnements et vectors
  1362.  
  1363. (.i.runtime;)    Closure:ProcN    0
  1364.  
  1365. Returns the time in 1/60 seconds since system boot.
  1366.  
  1367. (.i.chrono; any)    Closure:ProcN    1
  1368.  
  1369. Returns a three element vector. The first one is the value of any. The next one is the excution time (in seconds, ±1/60 second) to evaluate the form any  (Pay attention to lazyness, a print or a force may be useful to get a full evaluation) and the last one is the time used for Garbage Collection (Glanage de Cellules). Note that chrono automatically calls the compacifier GC BEFOREevaluating the form any  to get a significant “best” time (the time to make this GC is obviously not taken into account in the results given…). If the any form uses the GC via the closures compgc or masgc,  the result retourned will almost ignore the time taken for these GC.
  1370.  
  1371. (chrono (fib 20))     fl [10946 5.4000000000e+0 0.000000000000e+0]
  1372.  
  1373. (.i.masgc;)    Closure:ProcN    0
  1374.  
  1375. Calls the memory manager to execute a “Mark and Sweep” type GC. This GC is very efficient, but does not suppress memory fragmentation. Nevertheless it will suppress every  “indirection” blocks that could have been installed by forced closures or via the closure replace. Isolated garbage blocks with size 1 or 2 are not collected. Symbols whose value is undefined and which are not referencable ARE collected. The value returned is  ?.
  1376.  
  1377. (.i.compgc;)    Closure:ProcN    0
  1378.  
  1379. Calls the memory manager to execute a compacifying modified“Break Table” GC. This GC is slower, but suppresses fragmentation. It also collects all “indirection” type blocks (that could have been created via suspension forcing or replace closure). Symbols whose value is undefined and which are not referencable ARE collected. The value returned is  ?.
  1380.  
  1381. (.i.blength; any)    Closure:ProcN    1
  1382.  
  1383. Returns the memory used by any  in long words (32 bits). rhe memory used by the “tag” associated to every object (1 LW) is not taken into account.
  1384.  
  1385. (blength ‘a)        fl 6
  1386. (blength 2)        fl 1
  1387.  
  1388. (.i.bcopy; any)    Closure:ProcN    1
  1389.  
  1390. Returns a copy of the any . This is a simple surface copy (copy of the object itself, not of the objects referenced by it. It should not be employed on objects whose unicity is garanteed by the system (symbols…).
  1391.  
  1392. (bcopy 1)        fl 1
  1393. (eq? (bcopy x) x)    fl ƒ  ;(suppose value(x) ≠ symbol)
  1394. (=?  (bcopy x) x)    fl †    ;idem
  1395.  
  1396. (.i.replace; any1 any2)    Closure:ProcN    2
  1397.  
  1398. Replace physically every occurrence (in the sens of eq?)  of any1  by any2. This closure uses the indirections to operate. Use it with MUCH care on symbols (especially ƒ, †…). Its utility is yet to be determined, but is seems powerful…
  1399.  
  1400. (define x ‘(a b c))    fl (a b c)
  1401. (replace ‘b ‘k)    fl k
  1402. x            fl (a k c)
  1403.  
  1404. (.i.≈;)    Closure:ProcN    0
  1405.  
  1406. Obtenu au clavier par Option-X. Returns la dernière valeur obtenue au top-level.
  1407.  
  1408. (openi “palmipède”)    fl «IO-Unit»
  1409. (readio (≈))        fl (define (palmipede v)…)
  1410.  
  1411. (.i.where; any)    Closure:ProcN    1
  1412.  
  1413. Returns the memory address of any   in a fix size integer (32 bits).
  1414.  
  1415. (.i.find; any)    Closure:ProcN    1
  1416.  
  1417. Returns the list of every identifier whose value in the global environment is equal (in the sens of eq?) to the value of  any.  especially useful to find the symbol containing a closure or code…
  1418.  
  1419. (define x 1+)    fl {Closure: {Code 6800xx for 1+} in {Env: ()}}
  1420. (find x)    fl (x 1+)
  1421.  
  1422. 5.5 Help interface
  1423.  
  1424. We will describe the MacIntosh implementation. Note that:
  1425. • This implementation is usable only with 68020 or better microprocessors, a 68881 (or better) floating point unit is needed to use floating points (you may also use software emulation packages if you lack the 6888x. There exits good free-shareware ones). MMU is yet left unused.
  1426. • This implementation is not yet complete. The compiler is not really usable, the development environment is yet very poor (no printing, files limited to 32Ko…).
  1427.  
  1428. 5.5.1 .i.Configuration
  1429.  
  1430. The Help interpreter can run with very few memory  (less than 512 Ko) if you are ready to cope with many GC. One Mo is a nominal value. 4 Mo is really comfortable for most uses. Help runs under Multifinfer, and with System 7 since rel. 1.4.
  1431.  
  1432. The .i.memory; “asked for” by Help is simply the memory size indicated in the “Get information”  (Command-I) under the Finder. One can change it easily. By default, this size is 512 Ko and should therfore be modified if you have more than that available (i hope so).
  1433.  
  1434. To modify other features of Help, A set of resedit “TEMPLATES” ressources are given (insert these ressources in your Resedit copy) . They allow the user to simply modify Help interesting  .i.ressources; .Another set of resources allow the modification of the semantics of Help: almost all closures get strict if you paste strict.res file in Paresseux.
  1435.  
  1436. 5.5.1.1 The ressource CONF (Id 0, “Configuration”)
  1437.  
  1438. Contains four data, user modifiables:
  1439.  
  1440. t    Font Id: choose the default font of Help editor. The initial value (22) is for Courier (fixedwidth font, for better indent).
  1441. t    Font Size: Choose the default size for the font. Default: 9.
  1442. t    Block Visu: choose the duration (in 1/60 seconds) of lexical block visulisation (parenthesis match…) when using mouse click or cursor arrows. Initial value: 6 for 1/10 second.
  1443. t    Stack Memory %Age: choose how much memory you want to give to stacks. Initial value:10% (should be enough for almost any application).
  1444.  
  1445. 5.5.1.2 Ressources STC# 
  1446.  
  1447. They contain “C” strings. The first one(Id 0, “SynF Names”)  holds the name of every syntactic form of the language. These names may be modified to user convenience (You will have to modify every help source also…).
  1448.  
  1449. The next one  (Id 1, “Erreurs”) holds alternatively the error message and the error name of every help error. Again, can go wild modifying error message (no side-effects) or error names (but pay attention to sources that do refer to error names).
  1450.  
  1451. 5.5.1.3 Ressource STCL (Id 0, “Startup File”)
  1452.  
  1453. It simply contains the name of the startup file, loaded by Help when starting. (Initial value: Start”. It is preceded by two words. The first one should be left unmodified, the next one is the length of the whole thing in LONG WORD). It is possible to use a full path (See closures openi et  openo). I
  1454.  
  1455. 5.5.1.4  Ressource STCN (Id 0, “Closures Names”)
  1456.  
  1457. It contains informations related to predefined closures. Four fields for each closure:
  1458.  
  1459. t    Strictness: a number in hexa that should be interpreted as a 16 bit bit-array. The weak 15 bits gives strictness of the closure with respect to the first 15 args. The last one (the higher one)  gives the stricness for any supplementary argument.  It is therefore “easy” to suppress most lazyness from help by setting EVERY strictness to $FFFF and by using the macro defkap and kappa (instead of define and lambda, see Start file).
  1460.  
  1461. t    Arity: Gives the arity (or minimal arity) of the closure. User modification is neither required nor advised !
  1462.  
  1463. t    Type: Gives the type of the closure (fixed arity:0, variable arity: 1). User modification is neither required nor advised !
  1464.  
  1465. t    The string: Gives the name of the symbol that will denote the closure. If you modify this one, you will have to modify every sources that refer to this closure name ! (including Start file !).
  1466.  
  1467. 5.5.1.5 Ressource CART (Id 200, “Reader conf”)
  1468.  
  1469. Contains 256 bytes that give the reader the type of each ASCII codes. You may therefore modify the charcters for lists, vectors…  See § 5.2.8. You will again have to modify any source that may use these chars.
  1470.  
  1471. 5.5.1.6 Ressources WIND
  1472.  
  1473. To perfectly match your screen, the sizes and position of default Help windows are user-modifiable. You may set:
  1474.  
  1475. t    Size and position of the “Transcript” window, ID 1000;
  1476. t    Sizes and positions of the five edit windows, used cyclicly by Help at each window creation (ID 1001 to 1005).
  1477.  
  1478. 5.5.2 Using the editor
  1479.  
  1480. The editor intensively relies on ROM routines and inherit their limitations. The most important one being that no text should be longer than 32Ko. Undefined10 things may occur when this limit is reached.
  1481.  
  1482. The “Transcript” window receives every error message (it is associated to the default error input/output unit denoted bythe symbol “stder”). It has every limitation of other windows (32 Ko limit) so think to clean it from time to time (Command-A, Backspace. Forgetting to clean it will simply lead to memory loss and weird printing… no bomb).
  1483.  
  1484. Every window is an edit and evaluate window. The scheme used rely on the validation key used (and is really great to use IMHO). Two different modes:
  1485.  
  1486. t    The carriage return key is for editing. It will simply change from one line to the following one, with automatic indentation and “(“, “[“ or “{“ matching.
  1487.  
  1488. t    The ENTER key (numerical keyboard) is for evaluation. If a sequence of chars has already been selected, this sequence will be evaluated. Otherwise, the previous S-expression will be automatically selected and evaluated (try it, you will understand immediatly).
  1489.  
  1490. In this case (ENTER key) it is possible to change the  READ-EVAL-PRINT behaviour:
  1491.  
  1492. t    If you press shift-ENTER instead of ENTER, no value will be printed. This is VERY useful in the frame of lazy evaluation (no suspension will be forced by the printer).
  1493.  
  1494. t    If you press Option-ENTER instead of enter, the value will be printed on the error input-output default unit (denoted by the symbol stder). This is especially useful to evaluate part of (or a whole) file without damaging it. Example: to load a file, select open, type command-A (select all) then Option-ENTER. Note that values are always printed between “comment chars” ({ and }).
  1495.  
  1496. The mouse “click” allows to easily check the “matching” of the “()”, “[]” and “{}”. If their is no match, you will hear a beep. Another useful trick: if you click with the Option key pressed, the matching is verified, shown and SELECTED. You will then be able to cut, paste… it. The double click selects a “word”.
  1497.  
  1498. 5.5.2 The evaluator and the “bugs”…
  1499.  
  1500. Help has been used for much, much time, and very few bugs are known (in fact, only ONE, in bignum multiplication). In case of .i.bug; during evaluation (The mouse pointer will look like a small Macintosh) or during a GC (Mouse pointer in Sweep, mark, or Compacify 1,2 or 3 state):
  1501.  
  1502. t    If you use a debugger, simply GO to the address contained in the D6 register (type “G D6” under MacsBug). You will return to toplevel in the best possible conditions (stacks and main Help machine registers set to default values). Nevertheless, the system may be unstable, especially if Help or macintosh heap are damaged. You are advised to save and exit (or reboot).
  1503.  
  1504. t    Otherwise, The “System Error Manager” will try to draw a simple dialog with an error message and two buttons. If the Mac Heap is damaged…This drawing may be partial. Simply rememberthat LEFT button is “Reboot” and RIGHT is “Resume” (it will resume Help as if you had a debugger and had typed “G D6” (If the screen appearance has been damaged by the dialog, simply zoom and unzoom one of Help windows). Nevertheless, the system may be unstable, especially if Help or macintosh heap are damaged. You are advised to save and exit (or reboot).
  1505.  
  1506.  
  1507. Bibliography
  1508.  
  1509. [Abelson 85] :     Harold Abelson et Gerald Jay Sussman avec Julie Sussman
  1510.     Structure and Interpretation of Computer Programs
  1511.     M.I.T. Press, Cambridge, 1985
  1512. [Aho 83]:    A. Aho, J. Hopcroft et  J. Ullmann
  1513.     Structures de données et Algorithmes
  1514.     InterEditions 87 (orig.  Addison & Wesley 83)
  1515. [Aho 86]:    A. Aho, R. Sethi et  J. Ullmann
  1516.     Compilateurs: Principes, Techniques et Outils
  1517.     InterEditions 89 (orig.  Addison & Wesley 86)
  1518. [Allen 78]:    John Allen
  1519.     Anatomy of LISP
  1520.     McGraw-Hill Inc., 1978
  1521. [Allison 86]:    Lloyd Allison
  1522.     A Practical introduction to denotational semantics
  1523.     Cambridge University Press, 1986
  1524. [Ashcroft 85]:    Edward A. Ashcroft, William W. Wadge
  1525.     Lucid, the Dataflow Programming Language
  1526.     Academic Press, 1985
  1527. [Avenhaus 90]    J. Avenhaus & K. Madlener
  1528.     Term Rewriting and Equationnal Reasoning
  1529.     Elsevier Science Publishers - North Holland, 1990
  1530. [Barendregt 84]    Barendregt H.P.
  1531.     The Lambda calculus, Its syntax and semantics
  1532.     North Holland, 1984
  1533. [Bloss 88]    A. Bloss, P. Hudak, J. Young
  1534.     Code Optimisations for Lazy  Evaluation
  1535.     Lisp ans Symbolic Computation ,Vol. 1, N° 2,p 147-164 (1988)
  1536. [Briot 86]    J.P. Briot, P. Cointe & E. Saint-James
  1537.     Réécriture et récursion dans a closure
  1538.     Journées Langages Orientés Objet - p90-100
  1539. [Cayrol 85] :    Cayrol Michel
  1540.     Conception, Formalisation et Expérimentation d’un modèle pour le 
  1541.     traitement d’objets finis ou infinis dénombrables.
  1542.     Thèse d’Etat , Université Paul Sabatier, 1985
  1543. [Cayrol 87] :     Schiex Thomas,  Cayrol Michel
  1544.     Psil: L’infini en programmation
  1545.     AFCET-RFIA 1987
  1546. [Cayrol 92]    Cayrol Michel, Palmade Olivier, Schiex Thomas
  1547.     A fixed point Semantics for the ATMS.
  1548.     Journal of Logic and Computation (to appear), 1992
  1549. [Chailloux 80]:    Jérôme Chailloux
  1550.     Le Modèle VLisp: Description,  Implémentation et Evaluation
  1551.     Thèse de troisième cycle, Université P. et M. Curie (Paris VI), 1980
  1552. [Chailloux ??]:    Jérôme Chailloux & ??
  1553.     Manuel Le_Lisp version 15.21 
  1554.     INRIA - 19??
  1555. [Clinger 82]:    William Clinger
  1556.     NonDeterministic Call by Need is Neither Lazy Nor by Name
  1557.     ACM Symposium on Lisp and Functionnal Programming, 1982
  1558. [Clinger 87]:    William Clinger, Jonathan Rees (Editors)
  1559.     Revised3 Report on the Algorithmic Language Scheme
  1560.     M.I.T. Artificial Intelligence Memo. 
  1561. [CM2 87]:    Thinking Machines Company
  1562.     Connection Machine - Model CM-2 - Technical Summary
  1563.     Thinking Machines technical report HA87-4 , 1987
  1564. [Cohen 83]:    Comparison of Compacting Algorithms for Garbage Collection
  1565.     Jacques Cohen & Alexandru Nicolau
  1566.     ACM Transactions on Prgramming Languages and Systems Vol5, N°4, 
  1567.     Octobre 1983 - p532-553
  1568. [Cousineau 89]:    Guy Cousineau et Gérard Huet
  1569.     The CAML Primer - Projet Formel
  1570.     INRIA-ENS- 1989
  1571. [Dybvig 90]:    R. Kent Dybvig & Robert Hieb
  1572.     A New Approach to Procedures with Variable Arity
  1573.     Lisp & Symbolic computation, Vol.3, N°3, p229-244 (1990)
  1574. [Field 88]:    Anthony J. Field, Peter G. Harisson
  1575.     Functionnal Programming
  1576.     Addison Wesley Publishing company - 1988
  1577. [Gabriel 85]:    Richard P. Gabriel
  1578.     Performance and Evaluation of Lisp Systems
  1579.     The MIT Press - 1985
  1580. [Girardot  85]:    Jean Jacques Girardot
  1581.     Les langages et  les systèmes LISP
  1582.     EdiTests, 1985
  1583. [Halstead  85]:    Halstead R.H.
  1584.     MultiLisp: A Language for concurrent symbolic computation.
  1585.     ACM Transactions on Prgramming languages and systems 7(4),
  1586.     (p 501-538) (Octobre 1985).
  1587. [Hillis  ??]:    Hillis ??
  1588.     The Connection machine 
  1589.  
  1590. [Hindley 86]:    J. Roger Hindley & Jonathan P. Seldin
  1591.     Introduction to Combinators and l-Calculus
  1592.     Cambridge University Press, 1986
  1593.     Addison Wesley Publishing Company, 1968
  1594. [Jaulent 87]:    P. Jaulent & L. Baticle
  1595.     µ-processeurs 68020, 68030 et leurs coprocesseurs.
  1596.     Eyrolles (1987)
  1597. [Knuth 68]:    Donald E. Knuth
  1598.     The Art of Computer Programming. Vol.1. Fundamental Algorithms
  1599.     Addison Wesley Publishing Company, 1968
  1600. [Mac 85-86]:    Apple Computer Inc.
  1601.     Inside MacIntosh, Vol I à V
  1602.     Addison Wesley Publishing Company, 1985-86
  1603. [Schiex 87] :     Schiex Thomas
  1604.     Psil: Manipulation d’objets infinis dénombrables
  1605.     Rapport de D.E.A., Université Paul Sabatier, 1987
  1606. [Schiex 88]    Schiex Thomas
  1607.     Psil et la Connection Machine
  1608.     Rapport pour le C.N.R.S et le Conseil Régional (1988)
  1609. [Schiex 89] :     Schiex Thomas
  1610.     Psil: A héritier de Scheme
  1611.     BIGRE: Special Issue : “Putting Scheme to work” , 1989
  1612. [Schiex 91]    Schiex Thomas
  1613.     Interprétation et Compilation d'un dialecte paresseux de Scheme: Help
  1614.     Phd. Thesis
  1615.     Université Paul Sabatier, Toulouse, France
  1616. [Steele 90]    Guy L. Steele Jr.
  1617.     Common Lisp: the language (2nd edition)
  1618.     Digital Press - 1990
  1619. [Tarski 55]    Tarski A.
  1620.     A Lattice-theorical FixPoint Theorem and its Applications
  1621.     Pacific J. Math. (p285-309), 1955
  1622.  
  1623. Examples
  1624.  
  1625. {Function composition}
  1626. {••••••••••••••••••••}
  1627. (define (rond f g) 
  1628.         (lambda x (f (apply g x))))
  1629.  
  1630. {integers}
  1631. {••••••••}
  1632. (define n (… 0))
  1633.  
  1634. {all the fibonacci’s}
  1635. {•••••••••••••••••••}
  1636. (define (fibn n1 n2) (cons n1 (fibn (+ n1 n2) n1)))
  1637. (define fibl (cons 1 (cons 1 (map (∞ +) fibl (-1 fibl)))))
  1638.  
  1639. {A strange suite defined by a fixpoint}
  1640. {•••••••••••••••••••••••••••••••••••••}
  1641. (define (entrelace l1 l2)
  1642.       (cons (0 l1) (cons (0 l2) (entrelace (-1 l1) (-1 l2)))))
  1643. (define biz (entrelace (… 0) biz))
  1644.  
  1645. {readin flow}
  1646. {•••••••••••}
  1647. (define (in)(cons (read)(in)))
  1648. (define input (in))
  1649.  
  1650. {Factorielle CPS…}
  1651. {••••••••••••••••}
  1652. (define (fact x k)
  1653.      (cond (zero? x)(k 1)
  1654.      (fact (- x 1)(lambda(n)(k (* x n))))))
  1655. (define factl (cons 1 (map (∞ *) (… 1) factl)))
  1656.  
  1657. {Eratosthene crible}
  1658. {••••••••••••••••••}
  1659. (define (erat l)
  1660.      (cons (0 l)
  1661.            (erat (diff (-1 l)
  1662.                        (map (∞ *) (∞ (0 l)) l)))))
  1663.  
  1664. {Decomposition in prime numbers}
  1665. {••••••••••••••••••••••••••••••}
  1666. (define (dec n l)    ; l should be the prime numbers list
  1667.   (cond (=? n 1) ()
  1668.         (zero? (modulo n (0 l))) (cons (0 l) (dec (/ n (0 l)) l))
  1669.         (< n (* (0 l)(0 l))) (list n)
  1670.         (dec n (-1 l))))
  1671.  
  1672. {Church numerals}
  1673. {•••••••••••••••}
  1674. (define plus 
  1675.   (lambda(n1)
  1676.          (lambda(n2)
  1677.                 (lambda(f)
  1678.                        (lambda(x)
  1679.                               ((n1 f) ((n2 f) x)))))))
  1680.  
  1681. (define zero (lambda(f) (lambda(x) x)))
  1682.  
  1683. (define mul
  1684.   (lambda(n1)
  1685.          (lambda(n2)
  1686.                 (lambda(f)
  1687.                        (lambda(x)
  1688.                               ((n1 (n2 f)) x))))))
  1689. (define suc 
  1690.   (lambda(n)
  1691.          (lambda(f)
  1692.                 (lambda(x) ((n f)(f x))))))
  1693.  
  1694. (define a (suc zero))
  1695. (define deux (suc a))
  1696. (define trois (suc deux))
  1697. (define quatre ((mul deux)deux))
  1698.  
  1699. (define exp
  1700.   (lambda(n1)
  1701.          (lambda(n2)
  1702.                 (lambda(f)
  1703.                        (lambda(x)
  1704.                               (((n2 n1) f) x))))))
  1705.  
  1706. {The paradoxical combinators}
  1707. {•••••••••••••••••••••••••••}
  1708.  
  1709. ;by Church Y0
  1710. (define (Y0 g)
  1711.   ((lambda(x) (G (x x)))(lambda(x)(G (x x)))))
  1712.  
  1713. {The fixed point for fixed point combinator}
  1714. (define (G y)
  1715.   (lambda(f) (f (y f))))
  1716.  
  1717. ;by Turing Y1=Y0 G
  1718. (define Y1 
  1719.   ((lambda(a)
  1720.     (lambda(b) (b ((a a) b)))) (lambda(a)
  1721.                                  (lambda(b) (b ((a a) b))))))
  1722. ;another WEIRD fpc by Klop
  1723. (define £
  1724.  (lambda(a)
  1725.   (lambda(b)
  1726.    (lambda(c)
  1727.     (lambda(d)
  1728.      (lambda(e)
  1729.       (lambda(f)
  1730.        (lambda(g)
  1731.         (lambda(h)
  1732.          (lambda(i)
  1733.           (lambda(j)
  1734.            (lambda(k)
  1735.             (lambda(l)
  1736.              (lambda(m)
  1737.               (lambda(n)
  1738.                (lambda(o)
  1739.                 (lambda(p)
  1740.                  (lambda(q)
  1741.                   (lambda(s)
  1742.                    (lambda(t)
  1743.                     (lambda(u)
  1744.                      (lambda(v)
  1745.                       (lambda(w)
  1746.                        (lambda(x)
  1747.                         (lambda(y)
  1748.                          (lambda(z)
  1749.                           (lambda(r)
  1750. (r (((((((((((((((((((((((((
  1751.              (t h)i)s)i)s)a)f)i)x)e)d)p)o)i)n)t)c)o)m)b)i)n)a)t)o)r)
  1752.                            ))))))))))))))))))))))))))))
  1753.  
  1754. (define $ ((((((((((((((((((((((((
  1755.           (£ £)£)£)£)£)£)£)£)£)£)£)£)£)£)£)£)£)£)£)£)£)£)£)£)£)
  1756.  
  1757. ;another one, "à la Klop" in a French release
  1758. (define £
  1759.  (lambda(a)
  1760.   (lambda(b)
  1761.    (lambda(c)
  1762.     (lambda(e)
  1763.      (lambda(f)
  1764.       (lambda(g)
  1765.        (lambda(h)
  1766.         (lambda(i)
  1767.          (lambda(j)
  1768.           (lambda(k)
  1769.            (lambda(l)
  1770.             (lambda(m)
  1771.              (lambda(n)
  1772.               (lambda(o)
  1773.                (lambda(p)
  1774.                 (lambda(q)
  1775.                  (lambda(r)
  1776.                   (lambda(s)
  1777.                    (lambda(t)
  1778.                     (lambda(u)
  1779.                      (lambda(v)
  1780.                       (lambda(w)
  1781.                        (lambda(x)
  1782.                         (lambda(y)
  1783.                          (lambda(z)
  1784.                           (lambda(d)
  1785. (d (((((((((((((((((((((((((
  1786.               (H e)l)p)E)s)t)T)e)r)r)i)b)l)e)m)e)n)t)F)l)e)m)m)a)r)d)
  1787.                             ))))))))))))))))))))))))))))
  1788.  
  1789. ;factorial funtionnal, to use with Y combinators
  1790. (define (FF f)
  1791.   (lambda(x)
  1792.     (cond (zero? x) 1
  1793.           (* (f (1- x)) x))))
  1794.  
  1795. {computation with unknowns: replace the leafs of a tree by the maximum leaf}
  1796. {••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••}
  1797. (define (rpm l)
  1798.   (letrec [((f n rest&maxc)
  1799.                (cons (cons max (0 rest&maxc))
  1800.                      (cond (>? n (-1 rest&maxc)) n (-1 rest&maxc))))
  1801.            (rest (reduce f '(() | 0) l))
  1802.            (max (-1 rest))]
  1803.           (0 rest)))
  1804.  
  1805.  
  1806. Index
  1807.  
  1808.  
  1809. *, 20
  1810. +, 20
  1811. -, 20
  1812. /, 21
  1813. 1+, 20
  1814. 1-, 20
  1815. <>?, 17
  1816. <?, 21
  1817. =!, 12
  1818. =?, 17
  1819. >?, 21
  1820. acos, 22
  1821. and, 30
  1822. append, 19
  1823. apply, 23
  1824. asin, 22
  1825. atan, 22
  1826. atanh, 22
  1827. atom?, 18
  1828. bcopy, 32
  1829. begin, 14
  1830. binding=!, 25
  1831. binding=?, 25
  1832. bindings, 13
  1833. bit-arrays, 8
  1834. bitand!, 26
  1835. bitarray?, 25
  1836. bitchg!, 27
  1837. bitclr!, 26
  1838. bitcount, 26
  1839. bitfind, 26
  1840. bitnot!, 26
  1841. bitor!, 26
  1842. bitset!, 26
  1843. bitxor!, 26
  1844. blength, 32
  1845. boolean?, 16
  1846. booleans, 16
  1847. bug, 35
  1848. call/cc, 29
  1849. call/ep, 29
  1850. car=!, 18
  1851. cdr=!, 18
  1852. cell, 24
  1853. cell=!, 24
  1854. cell?, 24
  1855. cells, 7
  1856. chrono, 31
  1857. close, 28
  1858. closures, 16
  1859. coerce, 31
  1860. compgc, 32
  1861. cond, 12
  1862. Configuration, 33
  1863. cons, 18
  1864. cons?, 18
  1865. conses, 17
  1866. constants, 9
  1867. control, 29
  1868. cos, 21
  1869. cosh, 22
  1870. Debugging, 14
  1871. defext, 13
  1872. define, 10
  1873. defmacro, 13
  1874. envar, 25
  1875. environment?, 24
  1876. environnement, 24
  1877. eq?, 16
  1878. equal?, 17
  1879. equivalence predicates, 16
  1880. error, 28
  1881. error handling, 14
  1882. error?, 29
  1883. errors, 9, 28
  1884. eval, 30
  1885. exp, 22
  1886. expand, 23
  1887. explain, 29
  1888. find, 32
  1889. float, 21
  1890. floatings, 7
  1891. flushio, 28
  1892. force, 29
  1893. getcode, 23
  1894. getenv, 23
  1895. getstrict, 23
  1896. ibase, 22
  1897. if, 30
  1898. input/output, 27
  1899. integers, 6
  1900. intern, 20
  1901. keywords, 9
  1902. lambda, 11
  1903. length, 19
  1904. let, 14
  1905. letrec, 14
  1906. list, 19
  1907. list?, 18
  1908. lists, 7, 17
  1909. load, 28
  1910. log, 22
  1911. makebitarray, 25
  1912. makecell, 24
  1913. makeenv, 25
  1914. masgc, 31
  1915. memory, 33
  1916. modulo, 21
  1917. neq?, 16
  1918. nequal?, 17
  1919. nomemo, 12
  1920. not, 16
  1921. null?, 18
  1922. numbers, 20
  1923. openi, 28
  1924. openo, 28
  1925. or, 30
  1926. pause, 14
  1927. primitive expressions, 10
  1928. prin, 27
  1929. prindepth, 27
  1930. prinio, 28
  1931. prinlength, 27
  1932. print, 27
  1933. printdebug, 28
  1934. quote, 11
  1935. read, 27
  1936. readio, 28
  1937. replace, 32
  1938. ressources, 33
  1939. runtime, 31
  1940. Semantics, 4
  1941. setstrict, 23
  1942. sin, 21
  1943. sinh, 22
  1944. special characters, 10
  1945. sqrt, 22
  1946. stder, 27
  1947. stdi, 27
  1948. stdo, 27
  1949. step, 15
  1950. strings, 8
  1951. symbol?, 19
  1952. Symbols, 8, 19
  1953. tan, 22
  1954. tanh, 22
  1955. type, 30
  1956. vectors, 23
  1957. warn, 15
  1958. where, 32
  1959. zero?, 21, 27
  1960. ∞, 19
  1961. ≈, 32
  1962. …, 19
  1963. 1 Du moins, c’est la cas dans le cadre d’une utilisation normale. Il est possible d’élargir la portée d’une variable (Cf  § 3.5.1.1FR).
  1964. 2 Les premiers évaluateurs Lisp utilisaient une syntaxe différente, distinguant programmes et données (M Expressions opposées aux S Expressions actuelles).
  1965. 3 NaN= Not a Number. Retourné lors de la lecture d’une séquence de caractères ne formant pas un nombre flottant.
  1966. 4 structure de données comportant deux champs non typés appelés (pour des raisons historiques) CAR et CDR  (prononcé  “coudair).
  1967. 5  in the sens of eq?, there is no “hash-consing”.
  1968. 6 c’est le seul objet Help ayant une durée de vie limitée.
  1969. 7 type invisible pour l’utilisateur.
  1970. 8 type invisible pour l’utilisateur.
  1971. 9 type invisible pour l’utilisateur.
  1972. 10 Wthout any danger, i.e. you should be able to save anyway, then split the file using a decent text editor.
  1973.  
  1974.